package org.wmsafe.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.wmsafe.config.ApiLog;
import org.wmsafe.pojo.LinksType;
import org.wmsafe.service.LinksTypeService;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class HelloController {
    @Resource
    LinksTypeService linksTypeService;

    @ApiLog
    @RequestMapping("/")
    @ResponseBody
    public String hello() {
        List<LinksType> linksTypeList = linksTypeService.list();
        for (LinksType linksType : linksTypeList) {
            System.out.println(linksType);
        }
        return linksTypeList.toString();
    }
}
